<template>
  <div class="containers">
    <div class="menu container">
      <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        :ellipsis="false"
        @select="handleSelect"
      >
        <el-menu-item
          ><router-link
            to="/discovery/vip_zone"
            :class="$route.path.includes('vip_zone') ? 'active' : ''"
            class="router_link"
            >会员专区</router-link
          ></el-menu-item
        >
        <el-menu-item
          ><router-link
            to="/discovery/video_courses"
            :class="$route.path.includes('video_course') ? 'active' : ''"
            class="router_link"
            >视频课</router-link
          ></el-menu-item
        >
        <el-menu-item
          ><router-link
            to="/discovery/live_courses"
            :class="$route.path.includes('live_courses') ? 'active' : ''"
            class="router_link"
            >直播课</router-link
          ></el-menu-item
        >
        <el-menu-item
          ><router-link
            to="/discovery/major_courses"
            :class="$route.path.includes('major_courses') ? 'active' : ''"
            class="router_link"
            >线下课</router-link
          ></el-menu-item
        >
        <el-menu-item
          ><router-link
            to="/discovery/zone_list"
            :class="$route.path.includes('zone_list') ? 'active' : ''"
            class="router_link"
            >主题</router-link
          ></el-menu-item
        >
      </el-menu>
      <router-view></router-view>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "VipCourses",
});
</script>

<script lang="ts" setup>
import { onMounted, ref } from "vue";
import { useRouter, useRoute } from "vue-router";

const $route = useRoute();
const activeIndex = ref("0");

const handleSelect = (key: string, keyPath: string[]) => {};
</script>

<style lang="scss" scoped>
.container {
  margin: 0 auto;
  display: block;
  clear: both;

  width: 100%;
}
.el-menu--horizontal {
  margin-top: 2px;
  justify-content: center;
  border: 0;
}
// .container{
//   background-color: black
// }

.el-menu--horizontal > .el-menu-item.is-active {
  border-bottom: 0;
  color:#000
}

a {
  text-decoration: none;
  color: #000;
}
</style>
